package com.aspose.cells.a.f;

import com.aspose.cells.CellsException;
import com.aspose.cells.zasq;
import com.aspose.cells.b.a.d.zm;
import java.io.InputStream;
import java.util.Iterator;

public class zi implements Iterable {
   private zc a;

   public zi(zm var1) {
      try {
         this.a = ze.a(var1.g(), true);
      } catch (CellsException var3) {
         throw var3;
      } catch (Exception var4) {
         throw zasq.a(18, "Error for ZipFile", var4);
      }
   }

   public zi(InputStream var1) {
      try {
         this.a = ze.a(var1, false);
      } catch (CellsException var3) {
         throw var3;
      } catch (Exception var4) {
         throw zasq.a(18, "Error for ZipFile", var4);
      }
   }

   public static zi a(zm var0) {
      return new zi(var0);
   }

   public int a() {
      return this.a.a();
   }

   public zh a(int var1) {
      return this.a.a(var1);
   }

   public Iterator iterator() {
      return this.a.b();
   }

   public int a(String var1, boolean var2) {
      try {
         int var3 = this.a.a(var1);
         return var3 < 0 ? -1 : 0;
      } catch (Exception var4) {
         a(var4);
         return -1;
      }
   }

   public zh a(String var1) throws Exception {
      int var2 = this.a.a(var1);
      if (var2 < 0) {
         return null;
      } else {
         zh var3 = new zh(var1);
         var3.a(false);
         var3.a((long)var2);
         return var3;
      }
   }

   public zm a(zh var1) throws Exception {
      return new com.aspose.cells.b.a.d.zi(this.a.c(var1.b()), (long)this.a.a(var1.b()));
   }

   public void b() throws Exception {
      this.a.c();
   }

   private static void a(Exception var0) {
      throw new IllegalStateException("ZipFile Exception: " + var0.getMessage(), var0);
   }
}
